Skip to content

Conversation

mayrstefan
Copy link
Contributor

General information

The hardware inventory uses the graphic card name as unique key. If multiple cards with the same name are present only one card is inventorized. The section already includes the PCI slot which would be a better key to the dictionary of present graphic cards.

Bug reports

See https://forum.checkmk.com/t/linux-inventory-plugin-shows-one-card-of-such-type-but-server-has-eight/55985

To reproduce

  • Start Docker container checkmk/check-mk-raw:2.4.0-latest (currently Checkmk Raw Edition 2.4.0p13)
  • Create dummy plugin (e.g. /usr/lib/check_mk_agent/plugins/vga) to represent multiple video cards in this container:
#!/bin/bash
cat <<EOF
<<<lnx_video:sep(58)>>>
00:08.0 VGA compatible controller: Microsoft Corporation Hyper-V virtual VGA (prog-if 00 [VGA controller])
        Subsystem: Hightech Information System Ltd. Device 200b
        Kernel driver in use: hyperv_drm
00:08.1 VGA compatible controller: Microsoft Corporation Hyper-V virtual VGA (prog-if 00 [VGA controller])
        Subsystem: Hightech Information System Ltd. Device 200c
        Kernel driver in use: hyperv_drm
00:08.2 VGA compatible controller: Microsoft Corporation Hyper-V virtual VGA (prog-if 00 [VGA controller])
        Subsystem: Hightech Information System Ltd. Device 200d
        Kernel driver in use: hyperv_drm
00:08.3 VGA compatible controller: Microsoft Corporation Hyper-V virtual VGA (prog-if 00 [VGA controller])
        Subsystem: Hightech Information System Ltd. Device 200e
        Kernel driver in use: hyperv_drm
05:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Cape Verde PRO [Radeon HD 7700 Series] (prog-if 00 [VGA controller])
        Subsystem: Hightech Information System Ltd. Device 200b
        Kernel driver in use: fglrx_pci
EOF
  • add localhost as host in CheckMK
  • look at the inventory of localhost: only 2 instead of 5 expected graphic cards are listed

Proposed changes

Add the PCI slot to the inventory and use slot instead of name as key in the internal dictionary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant